package coop.bancocredicoop.proyectos.gd.domain;

import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Date;


public class DocumentType {

	private Long id;
	private Long version;
	private String shortName;
	private String name;
	private Boolean versionable;
	private Boolean purgeable;
	private Boolean hasExpiration;
	private Long daysInAdvanceForNotice;
	private Long defaultLastingMonths;
	private String uploadNotificationEmailAddress;

	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getShortName() {
		return shortName;
	}
	public void setShortName(String shortName) {
		this.shortName = shortName;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Boolean getVersionable() {
		return versionable;
	}
	public void setVersionable(Boolean versionable) {
		this.versionable = versionable;
	}
	public Boolean getPurgeable() {
		return purgeable;
	}
	public void setPurgeable(Boolean purgeable) {
		this.purgeable = purgeable;
	}
	public Boolean getHasExpiration() {
		return hasExpiration;
	}
	public void setHasExpiration(Boolean hasExpiration) {
		this.hasExpiration = hasExpiration;
	}
	public Long getDaysInAdvanceForNotice() {
		return daysInAdvanceForNotice;
	}
	public void setDaysInAdvanceForNotice(Long daysInAdvanceForNotice) {
		this.daysInAdvanceForNotice = daysInAdvanceForNotice;
	}
	public Long getDefaultLastingMonths() {
		return defaultLastingMonths;
	}
	public void setDefaultLastingMonths(Long defaultLastingMonths) {
		this.defaultLastingMonths = defaultLastingMonths;
	}
	public String getUploadNotificationEmailAddress() {
		return uploadNotificationEmailAddress;
	}
	public void setUploadNotificationEmailAddress(
			String uploadNotificationEmailAddress) {
		this.uploadNotificationEmailAddress = uploadNotificationEmailAddress;
	}
	public Long getVersion() {
		return version;
	}
	public void setVersion(Long version) {
		this.version = version;
	}
	public Date getDefaultExpirationDay() {
		Calendar calendar = GregorianCalendar.getInstance();
		calendar.add(Calendar.MONTH, this.getDefaultLastingMonths().
				intValue());
		return calendar.getTime();
	}

}
